package com.ckv.qcm.model;

import com.ckv.qcm.model.dao.AnswerDAO;
import com.ckv.qcm.model.dao.ResultDAO;

public class Result {

	
	private long idQuestion;
	private long idAnswer;
	private long idTrainee;
	private long idSession;
	private boolean isGood;

	private static ResultDAO dao = new ResultDAO();


	

	public long getIdQuestion() {
		return idQuestion;
	}

	public void setIdQuestion(long idQuestion) {
		this.idQuestion = idQuestion;
	}

	public long getIdAnswer() {
		return idAnswer;
	}

	public void setIdAnswer(long idAnswer) {
		this.idAnswer = idAnswer;
	}

	public long getIdTrainee() {
		return idTrainee;
	}

	public void setIdTrainee(long idTrainee) {
		this.idTrainee = idTrainee;
	}

	public long getIdSession() {
		return idSession;
	}

	public void setIdSession(long idSession) {
		this.idSession = idSession;
	}

	public boolean isGood() {
		return isGood;
	}

	public void setGood(boolean isGood) {
		this.isGood = isGood;
	}

	public Result() {
		super();
	}

	public Result( long idQuestion, long idAnswer,
			long idTrainee, long idSession, boolean isGood) {
		super();
			this.idQuestion = idQuestion;
		this.idAnswer = idAnswer;
		this.idTrainee = idTrainee;
		this.isGood = isGood;
		this.idSession = idSession;

	}

	public void save() 
	{
		dao.saveResult(this);
	}
}
